//Shot.h
/*Header file for Shot, a class that represents the position, and speed of a projectile
Created by: Robert Wirthma
*/

#ifndef SHOT_H
#define SHOT_H

#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

using namespace std;

class Shot
{
public:
	Shot();		//Initialize to 0 for now
	//Non-default constructor
	Shot(float); // pass in roomSize for boundary conditions
	float getXPos();
	float getYPos();
	float getZPos();
	float getForwardSpeed();
	float getLeftSpeed();
	float getUpSpeed();
	float getSize();
	void setSpeed(float);
	void setXPos(float);
	void setYPos(float);
	void setZPos(float);
	void setHorFacing(int);
	void setVertFacing(int);
	int updatePositions();

private:
	/*For serialization */
	friend class boost::serialization::access;
	template<class Archive>
	void serialize(Archive &ar, const unsigned int &version) {
		ar & forwardSpeed;
		ar & leftSpeed;
		ar & upSpeed;
		ar & xPos;
		ar & yPos;
		ar & zPos;
		ar & size;
		ar & roomSize;
	}
	float roomSize;
	float forwardSpeed;
	float leftSpeed;
	float upSpeed;
	float xPos;
	float yPos;
	float zPos;
	int horFacing;
	int vertFacing;
	float size;
};

#endif
